<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        body {
            overflow: hidden;
        }

        .canvas_wrap {
            position: relative;
            width: 100vw;
            height: 100vh;
            margin: 0 auto;
        }

        #bulletCanvas,
        #bgCanvas,
        #canvas,
        .gold_box,
        .ranking_list {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(calc(-50% - 100px), -50%);
        }

        #bulletCanvas {
            z-index: -1;
        }

        #bgCanvas {
            z-index: -2;
        }

        .personImg {
            position: relative;
            width: 64px;
            height: 64px;
            overflow: hidden;
        }

        .personImg img {
            position: absolute;
            top: 0;
            left: 64px;
            width: 100%;
            height: 100%;
        }

        .gold_box {
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            width: 1000px;
            height: 600px;
            z-index: 1;
            background-color: rgba(0, 0, 0, 0.5);
            color: aquamarine;
        }

        .gold_title {
            text-align: center;
            font-size: 52px;
        }

        .gold_text {
            font-size: 32px;
            margin: 32px 0;
        }

        .gold_btn {
            padding: 10px 20px;
            font-size: 20px;
            background-color: #fff;
            color: #000;
            cursor: pointer;
            box-shadow: inset 0 0 5px 1px #7d7e7e;
        }

        .ranking_list {
            position: absolute;
            left: calc((100vw - 1000px) / 2 + 900px);
            text-align: center;
            padding: 20px;
            width: 200px;
            height: 600px;
            background-color: #1e1e1e;
            transform: translate(10px, -50%);
            box-sizing: border-box;
            color: #fff;
        }

        .ranking_list_box {
            margin-top: 30px;
        }

        .ranking_list_box li {
            margin-top: 16px;
            font-size: 20px;
        }

        .ranking_list_box li:first-child {
            color: #f40;
            font-size: 32px;
            font-weight: bold;
        }

        .ranking_list_box li:nth-of-type(2) {
            color: rgb(6, 139, 216);
            font-size: 28px;
            font-weight: bold;
        }

        .ranking_list_box li:nth-of-type(3) {
            color: rgb(101, 212, 10);
            font-size: 24px;
            font-weight: bold;
        }

        .skill {
            position: absolute;
            left: 50%;
            bottom: 10px;
            width: 64px;
            height: 64px;
            transform: translateX(-50%);
            background-image: url('./images/skillIcon.png');
            background-size: cover;
            border: 4px solid #fff;
        }

        .skill.loading {
            filter: saturate(0) blur(1px);
        }

        .skill_loading {
            display: none;
            width: 100%;
            height: 100%;
            justify-content: center;
            align-items: center;
            color: #fff;
            font-size: 28px;
        }
    </style>
    <title>LOL走位（canvas版）</title>
</head>

<body>
    <div class="canvas_wrap">
        <canvas id="canvas" width="1000" height="600"></canvas>
        <canvas id="bulletCanvas" width="1000" height="600"></canvas>
        <!-- 地图 -->
        <canvas id="bgCanvas" width="1000" height="600"></canvas>
        <!-- 游戏结束面板 -->
        <div class="gold_box">
            <h1 class="gold_title">游戏结束</h1>
            <p class="gold_text">得分：0s</p>
            <div class="gold_btn">再来一局</div>
        </div>
        <!-- 游戏排行榜 -->
        <div class="ranking_list">
            <h3 class="ranking_title">本地排行榜</h3>
            <ul class="ranking_list_box"></ul>
            <div class="skill">
                <span class="skill_loading">3s</span>
            </div>
        </div>
    </div>
    <script src="./index.js"></script>
</body>

</html>